#!/usr/bin/env python3
"""
房屋价格预测系统启动脚本
"""

import subprocess
import sys
import os

def main():
    """启动房屋价格预测系统"""
    print("🏠 启动房屋价格预测系统...")
    print("正在启动Streamlit应用...")
    
    try:
        # 运行Streamlit应用
        subprocess.run([sys.executable, "-m", "streamlit", "run", "app.py"], check=True)
    except KeyboardInterrupt:
        print("\n👋 应用已停止")
    except subprocess.CalledProcessError as e:
        print(f"❌ 启动失败: {e}")
        print("请确保已安装所有依赖: pip install -r requirements.txt")
    except FileNotFoundError:
        print("❌ 未找到app.py文件")
        print("请确保在正确的目录中运行此脚本")

if __name__ == "__main__":
    main()
